// base.entity.ts
export default  class BaseEntity {
    public static ToEntity<D,E>(dto: D) {
        const entity = new BaseEntity();
        for (const key in dto) {
            if (Object.prototype.hasOwnProperty.call(dto, key)) {
                const element = dto[key];
                entity[key.toString()] = element
            }
        }
        return entity as E;
    }
}